﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script type="text/javascript" src="../com.attilax/core/approot_js.jsp"></script>

<script type="text/javascript" src="../com.atilax.frmwk/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="cfg.js"></script>
<script type="text/javascript" src="js/js_ui.js"></script>
<script type="text/javascript" src="../com.attilax/core/approot_js.jsp"></script>
<script type="text/javascript" src="../com.attilax/core/core.js"></script>
<script type="text/javascript" src="../com.attilax/time/time.js"></script>
 <script type="text/javascript" src="../com.attilax/templete/jquery.tmpl.js"></script>
 
  <script type="text/javascript" src="../com.attilax/core/core.js"></script>
    <script type="text/javascript" src="../com.attilax/hre/hre.js"></script>
    <script type="text/javascript" src="cfg.js"></script>
<style type="text/css">
.selected {
	font-size: 18px;
	font-weight: bolder;
	color: #F30;
	background-color: #CC3;
}
</style>
<link rel="stylesheet" type="text/css" href="../com.atilax.frmwk/bootstrap/css/bootstrap.css"/>
    <script src="list.js"></script>
  <script src="0list.test.js"></script>
      <script type="text/javascript" src="../com.attilax/net/req.js"></script>
      <script type="text/javascript" src="../com.attilax/sql/filterParser.js"></script>

</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label for="from">
    发货人名称电话地址：<br />
    <input name="from" type="text" id="from" placeholder="姓名，电话,省 市 区 详细地址,516333" value="" style="width:500px;" />
  </label>
  <select name="type_id">
    
    <option value="天天快递">天天快递（推荐）</option><option value="快捷快递">快捷快递（推荐）</option><option value="龙邦速递">龙邦速递（推荐）</option><option value="增益快递">增益快递（京东专用）淘宝商家勿下</option>              </select>
<br />
格式：陈生,13652566665,广东省 广州市 荔湾区 详细地址,51633333
<label for="textarea"></label>
  <textarea  placeholder="" name="textarea" id="textarea" cols="450" rows="5" style="width:500px;" onchange="change_event();"   data-options="required:true,validType:addrCheckor"  class="easyui-validatebox" >
  
  </textarea>
  <input type="button" name="button" id="button" value="校验"  onclick="atiValid();"/>
  <div style="display:none">
  <input type="button" name="button" id="button" value="test insert"  onclick=" btn_click()"/>
  <input type="button" name="button2" id="button2" value="t cross domain callback"  onclick="callback_t()"/>
  </div>
</form>
<script src="AtiValid.js"></script>
<script src="validAddr.js"></script>
<script>

function page_loadQ1()
{
window.setInterval(function()
{
	try{
			 change_event();
	}catch(e)
	{
		showErr(e);}
//	var a=txt.split("<br>");
},1000);
}

if(UrlParm.parm('dbg')==1) 
{}else
page_loadQ1();

function change_event()
{
	//alert("change_event");
	try{
var v=$("#textarea").val();
var a=v.split("\n");
var i=0;
for(var j=0;j<a.length;j++)
{
   if($.trim(a[j]).length>0)
   i++;	
}
// alert(i);
window.parent.calcLine(i);	
	}catch(e)
	{
		
		alert(e);
	}
}
function callback_t()
{
	try{
window.parent.cbk();
	}catch(e){
		
		alert(e);
	}
}
  function callback(data)
  {
	  alert(data);
	  window.parent.insertData_invokeFrm_callback();
	 /* data=str2json(data);
	  $("#table1_tmpl tr").eq(0).nextAll().remove();


 

  　$("#table1_tmpl").tmpl(data).appendTo('#table1_tmpl');

 $("#table1 tr").eq(1).hide();*/
	  
  }
  function btn_click()
    {
		try
		{
		//	var sql=encodeURIComponent(" select * from customers ");    //where name like '%"+$("#textfield").val()+"%' 
	  	var mp="$method=aaaAddr.AddrSvr.insert&$callback=callback&uname="+UrlParm.parm('uname')+"&"+$("#form1").serialize();
		
	  //	alert(mp);
		HRE.exe(mp,callback);	
		}catch(e)
		{
			alert(e);
		}
  }

</script>
</body>
</html>
